package com.sean.designpatterns.create.prototype;

public abstract class Shape implements Cloneable {

    private String id;
    protected String type;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    abstract void draw();
    public Object clone(){
        Object object = null;
        try{
            object=super.clone();
        }catch (CloneNotSupportedException e){
            e.printStackTrace();
        }
        return object;
    }

    @Override
    public String toString() {
        return "Shape{" +
                "id='" + id + '\'' +
                ", type='" + type + '\'' +
                '}';
    }
}
